package com.yangoxix.lovegoing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yangoxix.lovegoing.pojo.Activity;
import com.yangoxix.lovegoing.pojo.UserInActivity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserInActivityMapper extends BaseMapper<UserInActivity> {
    @Select("select * from activity where activityname in " +
            "(select useractivity.activityname from useractivity where username = #{username})")
    List<Activity> selectListByUsername(@Param("username") String username);
}
